home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Tool Chest / Dev.CD Feb 97 TC.toast / Utilities / Developer Forms / Apple Bug Reporter 1.6 / Apple Bug Reporter 1.6 / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1994-09-15  |  28.5 KB  |  25 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in.6</name>
  5.     <id>-1</id>
  6.     <cardCount>4</cardCount>
  7.     <cardID>8637</cardID>
  8.     <listID>3032</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû Script info for this stack. ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
  17.  
  18. Size of script:  28656 chars.         11/17/92
  19. ¬†¬†¬†¬†¬†¬†w/header:  29270 chars.
  20.  
  21. HANDLERS:  closeStack,displayLegalNotice,doHelp,TEXWindowClosing,getINITs,
  22. --         getMachInfo getMailMethod,goBackButton,goHome,mouseUpInPicture,multiCheckMenu,
  23. --         notImplemented,openStack,singleCheckMenu,splashScreen,triangleButton
  24.  
  25. FUNCTIONS: auxVersion,bugSent,checkMark,complainAboutPersonalInfo,maxProblemSummary,
  26. --         personalInfoCheck,secretCode,stripNonDials,text,textFileVersion
  27. ‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû‚àû
  28.  
  29.  
  30. ••••••••••••••
  31. -- Apple Bug Reporter
  32. -- Begun 7/28/91 by Barry Langdon-Lassagne
  33. -- version 1.0b1 10/11/91
  34. -- version 1.0b2 11/22/91
  35. -- version 1.0b8 11/03/92 by bRYgUY K. Carter
  36. -- version 1.0b9 08/17/93 by Barry Langdon-Lassagne
  37. -- version 1.5a2 10/31/93 by Barry Langdon-Lassagne
  38.  
  39. -- ¬©Copyright 1991-93 by Apple Computer, Inc.
  40. -- All Rights Reserved.
  41.  
  42. --‚àÜ Text to be localised indicated by ‚Äú‚àÜ‚Äù (option-j)
  43. --  When localising this stack, do a search for ‚àÜ in
  44. --  All the scripts, especially the Background and
  45. --  Stack scripts.
  46.  
  47. -- XCMDs/XFCNs USED BY THIS STACK:
  48. -- HpopupMenu()      -- Author:  Guy de Picciotto.
  49. -- FilesInSys()      -- Author:  Jay Hodgon, Apple Computer
  50. -- FileVersion()     -- Author:  Jay Hodgon, Apple Computer
  51. -- XGestalt()
  52. -- DropInOB          -- Author:  Rick Eames, Apple Computer
  53. -- AUXisRunning()    -- Authors: Anup Murarka,Eric Carlson Apple Computer
  54. -- MachineName()     -- Author:  Barry Langdon-Lassagne, Apple Computer
  55. -- ModalDialog()     -- Author:  Kevin Calhoun ( v.1.0.3 )
  56. -- ReadStrResource() -- Author:  Barry Langdon-Lassagne, Apple Computer
  57. -- TEXWindow()       -- Author:  ???
  58. ••••••••••••••
  59.  
  60. function auxVersion
  61. -- this reflects the version of software for which
  62. -- the outside developers (or whomever) are reporting bugs
  63. -- This information is automatically entered in the Miscellaneous
  64. -- field of the Configuration cards
  65. return "" -- put "ElectroGlide" or "A/UX 3.0.2" or something
  66. end auxVersion
  67.  
  68. function textFileVersion
  69. return "Text File Version: 1005 (Apple Bug Reporter Stack)"
  70. end textFileVersion
  71.  
  72. function maxProblemSummary
  73. -- The maximum number of characters allowed in the Problem Summary
  74. -- Note: change this number in the Help text as well
  75. return 80
  76. end maxProblemSummary
  77.  
  78. ---------------------------------------------------------------------
  79. -- ‚àÜ The majority of text strings appear here
  80. --   so that this stack can more easily be localised for other countries
  81. --   When you need a piece of text, call this function. For instance,
  82. --   to tell the user their problem report has already been sent, write
  83. --   a script that says:
  84. --     answer text("alreadySent") with text("OK")
  85. --
  86. --   Then, when this stack is localised, all that needs to be done is change the
  87. --   text as it appears here
  88.  
  89. function text which
  90. return ReadStrResource(which)
  91. -- else
  92. -- return "Error - Text to place here could not be located!"
  93. -- end if
  94. end text
  95.  
  96. -----------------------------------------------------------------------
  97.  
  98. on openStack
  99. global oldUserLevel, oldtextArrows, oldBlindTyping, cqfCustom
  100. if the screenRect = "0,0,512,342" then -- Macintosh SE size monitor
  101. hide menubar
  102. end if
  103. -- Check to see if they have a recent enough HyperCard
  104. if the version < 2.0 then
  105. answer text("wrongVersion")
  106. doMenu "Quit HyperCard"
  107. else
  108. -- remember system state, set it the way we want it
  109. put the userLevel into oldUserLevel
  110. set the userlevel to 5
  111. get textArrows
  112. put it into oldtextArrows
  113. set textArrows to TRUE
  114. get blindTyping
  115. put it into oldBlindTyping
  116. set blindTyping to FALSE
  117.  
  118. put FALSE into cqfCustom -- TRUE if this is the CQF Version 8/16/94
  119.  
  120. -- if bg field "Bugs Reported" of card "Cover Card" of bg "Bug List" contains "‚Ä¢" then
  121. -- answer text("whatToDoAboutUnsentBugs")¬¨
  122. -- with text("Nothing") or text("View List") or text("Send Them")
  123. -- if it is text("View List") then
  124. -- go to card "Index Card"
  125. -- else if it is text("Send Them") then
  126. -- go to card "Index Card"
  127. -- send mouseup to bg button "Send All Unsent Reports"
  128. -- end if
  129. -- end if
  130. end if -- version check
  131. pass openStack
  132. end openStack
  133.  
  134. on mouseUpInPicture
  135. -- answer word 2 of the params
  136. put word 2 of the params into x
  137. close window the value of x
  138. end mouseUpInPicture
  139.  
  140. on closeStack
  141. global oldUserLevel,oldtextArrows,oldBlindTyping
  142. show menubar
  143. set the userLevel to oldUserLevel
  144. set textArrows to oldtextArrows
  145. set blindTyping to oldBlindTyping
  146. pass closeStack
  147. end closeStack
  148.  
  149. on goBackButton what
  150. answer "Go Back Button is no longer needed" && what
  151. -- if what is "show" then
  152. -- set the visible of bg button "Go Back" of cd "Cover Card" to TRUE
  153. -- set the visible of bg field "Go Back Title" of cd "Cover Card" to TRUE
  154. -- else if what is "hide" then
  155. -- set the visible of bg button "Go Back" of cd "Cover Card" to FALSE
  156. -- set the visible of bg field "Go Back Title" of cd "Cover Card" to FALSE
  157. -- end if
  158. end goBackButton
  159.  
  160. function personalInfoCheck
  161. if (line 3 of bg field "Personal Info" of cd "Cover Card" is empty or¬¨ -- first name
  162. line 4 of bg field "Personal Info" of cd "Cover Card" is empty or¬¨ -- last name
  163. line 5 of bg field "Personal Info" of cd "Cover Card" is empty or¬¨ -- phone
  164. line 11 of bg field "Personal Info" of cd "Cover Card" is empty or¬¨ -- e-mail address
  165. line 12 of bg field "Personal Info" of cd "Cover Card" is empty) then -- country
  166. put text("NeedMorePersonalInfo2") into error
  167. else if line 16 of bg field "Personal Info" of cd "Cover Card" is "on" and¬¨
  168. (text("Server Name") is empty or text("Server Zone Name") is empty or¬¨
  169. text("Server Volume Name") is empty) then
  170. put text("ServerNotConfigured2") into error
  171. else
  172. put "NoErr" into error
  173. end if
  174. return error
  175. end personalInfoCheck
  176.  
  177. function complainAboutPersonalInfo
  178. --  global whereWeCameFrom, lastBugModified
  179. -- used in script troubleshootBug
  180. -- and in button script for send all
  181. answer text("needMorePersonalInfo") with text("Cancel") or text("OK")
  182. if it is text("OK") then
  183. -- put empty into whereWeCameFrom
  184. -- put the id of this card into lastBugModified
  185. send personalInfo to cd 1 -- handler is in bg script BL-L 7/31/93
  186. return text("OK")
  187. else -- Cancel
  188. return text("Cancel")
  189. end if
  190. end complainAboutPersonalInfo
  191.  
  192. on getMachInfo --gets all of the Machine info collected by the Xthings.
  193. global machDes
  194. lock screen
  195. put empty into machDes
  196. go bg "dataworld"
  197. get line 10 of background field "This Machine"
  198. put the first word in line it of background field "gestaltMachineType" ¬¨
  199. & return after machDes
  200. get line 3 of background field "This Machine"
  201. put the first word in line it of background field "gestaltKeyboardType" ¬¨
  202. & return after machDes
  203.  
  204. get line 6 of background field "This Machine"
  205. put "RAM=" & it & return after machDes
  206.  
  207. get line 4 of background field "This Machine"
  208. put "Logical RAM=" & it & return after machDes
  209.  
  210. get line 9 of background field "This Machine"
  211. if it = 0 then put "Virtual Memory turned OFF" & return after machDes
  212.  
  213. get line 1 of background field "This Machine"
  214. if it = 0 then put "32-bit addressing NOT enabled" & return after machDes
  215.  
  216. get line 2 of background field "This Machine"
  217. if it = 0 then put "NO FPU" into the seventh line of background field "Output"
  218. else put "FPU Type =" & the first word of line (it+1) of background field "gestaltFPUType"¬¨
  219. after machDes
  220.  
  221. get line 11 of background field "This Machine"
  222. put "ROM Version=" & it & return after machDes
  223. put "............................................................................" ¬¨
  224. after machDes
  225.  
  226. put machdes after bg field "Output"
  227. go bg "entry"
  228. unlock screen
  229. end GetMachInfo
  230.  
  231.  
  232. function stripNonDials theNumber
  233. -- ‚àÜ remove all "non phone" characters
  234. repeat with count = the length of theNumber down to 1
  235. if char count of theNumber is not in "0123456789"
  236. then delete char count of theNumber
  237. end repeat
  238. return theNumber
  239. end stripNonDials
  240.  
  241. function secretCode x
  242. global cqfCustom
  243.  
  244. put FALSE into doContinue
  245. put "" into stackType -- put "" into stackType if phone # needed for bug number; put "Special" if phone # is not needed
  246.  
  247. if stackType is not "Special" then
  248. if line 5 of bg field "Personal Info" of card "Cover Card" is "" then
  249. return "Error"
  250. else -- there is a phone number already
  251. put TRUE into doContinue
  252. end if
  253. else -- Special, phone number unnecessary
  254. put TRUE into doContinue
  255. end if -- stackType
  256.  
  257. if doContinue is TRUE then
  258. put stripNonDials(line 5 of bg field "Personal Info" of card "Cover Card") into phoneCode
  259. -- put bg field "Site Number" of cd "Cover Card" into phoneCode -- Old CQF method, leave commented out
  260. put the time into temp
  261. convert temp to seconds
  262. put char 3 to 10 of temp into theSecs
  263. put the number of chars of phoneCode into pn
  264. if pn < 4 then
  265. put "0000" before phoneCode
  266. put the number of chars of phoneCode into pn
  267. end if
  268. -- put the number of cards of bg "Bug Report" into bugNumber
  269. -- put bugNumber - 1 into bugNumber
  270. get cd field "Last Bug Number" of card "Cover Card"
  271. put it + 1 into cd field "Last Bug Number" of card "Cover Card"
  272. put it + 1 into bugNumber
  273. put "000" before bugNumber
  274. put the number of chars of bugNumber into b
  275. put char b-2 to b of bugNumber into bugNumber
  276. put char pn-3 to pn of phoneCode & "." & bugNumber into secretNumber
  277. -- put char 1 to pn of phoneCode & "." & bugNumber into secretNumber -- Old CQF method, leave commented out
  278. if cqfCustom then
  279. put "CQF " before secretNumber -- use this for CQF
  280. end if -- cqfCustom
  281. return secretNumber
  282. end if
  283. end secretCode
  284.  
  285. on goHome
  286. if the optionKey is not down then
  287. domenu "compact stack"
  288. end if
  289. answer text("whereToGo") with text("GoHome") or text("Quit") or text("Cancel")
  290. if it is text("GoHome") then
  291. visual effect zoom in
  292. displayLegalNotice
  293. go home
  294. else if it is text("Quit") then
  295. displayLegalNotice
  296. doMenu "Quit HyperCard"
  297. end if
  298. end goHome
  299.  
  300. on displayLegalNotice
  301. set the cursor to busy
  302. set the lockScreen to TRUE
  303. set the cursor to busy
  304. go first
  305. set the cursor to busy
  306. set the visible of card field "Legal Notice" to TRUE
  307. set the cursor to busy
  308. set the lockScreen to FALSE
  309. repeat with i= 1 to 5
  310. wait 1 secs -- wait 5 seconds
  311. if the mouse is down then exit repeat
  312. set the cursor to busy
  313. end repeat
  314. set the cursor to busy
  315. set the visible of card field "Legal Notice" to FALSE
  316. set the cursor to busy
  317. end displayLegalNotice
  318.  
  319. on splashScreen
  320. -- answer text("stackName") & return & text("stackAuthor") &¬¨
  321. -- return & text("copyRightNotice") with text("Help") or text("OK")
  322. put ModalDialog("About Box",dialogInput,cardCenter) into aResult
  323. if line 1 of aResult is not empty then -- they want Help
  324. return TRUE
  325. else
  326. return FALSE
  327. end if
  328. end splashScreen
  329.  
  330. on doHelp
  331. -- note: the help text is located in an invisible field on the first card
  332. -- called "Help Text" (actually it's a background field)
  333. -- to access it, execute the following in the message box:
  334. -- show bg field "Help Text"
  335.  
  336. put text("HelpWindowName") into helpWindow
  337. if there is a window helpWindow then
  338. send "select" to window helpWindow
  339. exit doHelp
  340. end if
  341. put (the loc of window (the short name of this stack)) into stackLeftTop
  342. put (the left of bg field "Help Text" of cd 1) + (item 1 of stackLeftTop) into theLeft
  343. put (the top of bg field "Help Text" of cd 1)  + (item 2 of stackLeftTop) into theTop
  344. put (the right of bg field "Help Text" of cd 1)  + (item 1 of stackLeftTop)into theRight
  345. put (the bottom of bg field "Help Text" of cd 1)  + (item 2 of stackLeftTop)into theBottom
  346. put "Geneva" into theFont
  347. put 10 into theFontSize
  348. put 13 into theLineHeight
  349. put -1 into theLineLength
  350. put bg fld "Help Text" of cd 1 into theText
  351.  
  352. TEXWindow helpWindow,theText,theLeft,theTop,theRight,theBottom,theFont,theFontSize,theLineHeight,theLineLength
  353. get the result
  354. if it is not empty then
  355. answer it
  356. end if
  357. end doHelp
  358.  
  359. on TEXWindowClosing theWindowName,textIsDirty
  360. -- required by XCMD TEXWindow
  361. -- BL-L 11/1/93 adds ability to save changes from a floating text window (from XCMD TEXWindow)
  362. -- Don't allow changes to Help text. (To change help text, directly modify the
  363. -- bg field "Help Text" on the cover card).
  364. --put the globalRect of window theWindowName into theRect
  365. if theWindowName is "Notes" and textIsDirty then
  366. put the text of window theWindowName into bg fld theWindowName of cd "Cover Card"
  367. end if
  368. return TRUE
  369. end TEXWindowClosing
  370.  
  371. on saveTEXWindowInfo theWindowName,textIsDirty
  372. -- BL-L 11/1/93 adds ability to save changes from a floating text window (from XCMD TEXWindow)
  373. -- Don't allow changes to Help text. (To change help text, directly modify the
  374. -- bg field "Help Text" on the cover card).
  375. --put the globalRect of window theWindowName into theRect
  376. --  set lockText of bg fld theWindowName to false
  377. end saveTEXWindowInfo
  378.  
  379. function checkMark what
  380. if what is "no space" then
  381. return "!"
  382. else
  383. return " !"
  384. end if
  385. end checkMark
  386.  
  387. function bugSent
  388. put FALSE into stat
  389. if the short name of this bg is "Bug Report" then
  390. if bg field "Sent" is not empty and¬¨
  391. bg field "Sent" is not text("neversent") and¬¨
  392. bg field "Sent" is not text("newBug") and¬¨
  393. bg field "Sent" is not text("unsent") then
  394. put TRUE into stat -- it's been sent
  395. else
  396. put FALSE into stat -- bug has not been sent yet
  397. end if
  398. end if
  399. return stat
  400. end bugSent
  401.  
  402. on singleCheckMenu listType
  403. -- This script is used to activate the popup menus
  404. -- I assume NO SUBMENUS for this script
  405. -- It is for popup menus that have only one item checked at a time
  406. -- need a bg field called   listType List   that has all the menuitems
  407. -- (don't forget to modify the bg script to show and hide this new List field)
  408. -- need a bg field called listType to store the menu result
  409. -- Example: on the Problem Report cards, there is a popup menu for
  410. --      The severity of a bug, called "Priority"
  411. --      Here is what needs to be created:
  412. --         1) a button called "Priority    " (that's four spaces after)
  413. --            the script for the "Priority    " button should read:
  414. --               on mouseDown
  415. --                 singleCheckMenu "Priority"
  416. --               end mouseDown
  417. --               on mouseUp
  418. --                 set the hilight of me to FALSE
  419. --               end mouseUp
  420. --         2) a button with a down arrow, overlaying the four spaces
  421. --             the script for the down arrow button should send
  422. --             mouseups and mousedowns to the "Priority    " button
  423. --         3) a bg field called "Priority" where the result will go
  424. --         4) a bg field (invisible), called "Priority List"
  425. --            listing all proper priorities
  426. --         5) Modifications to the bg script to show and hide the
  427. --            "Priority List" bg field (see the other scripts there)
  428. set cursor to busy
  429. put listType & " List" into listField
  430. if the optionKey is down and the shiftKey is down then
  431. set the visible of bg field listField to NOT visible of bg field listField
  432. exit singleCheckMenu
  433. else if bugSent() then
  434. answer text("beenSent")
  435. exit singleCheckMenu
  436. end if
  437.  
  438. set the hilight of the target to TRUE
  439. put bg field listField into itemList
  440. -- add checkmark to itemList
  441. -- debug checkpoint
  442.  
  443. -- See if there's a menuitem to put a checkmark next to...
  444. set cursor to busy
  445. put the number of lines of itemList into endLine
  446. if bg field listType ‚↠EMPTY then
  447. if bg field listType is in itemList then
  448. -- Find the item in the list
  449. put offset(bg field listType,itemList) into startCharLoc
  450. if startCharLoc > 0 then -- we found a match!
  451. -- check to see if we really found it (see if item has commas or carriage returns on both sides of it)
  452. put char (startCharLoc - 1) of itemList into prevChar
  453. put char (startCharLoc + the length of bg field listType) of itemList into followChar
  454. if (prevChar is "," or prevChar is return) and (followChar is "," or followChar is return) then
  455. put checkMark() after char (startCharLoc + the length of bg field listType - 1) of itemList
  456. else -- gotta look for a match the hard way
  457. -- search through itemList for the correct match
  458. repeat with aLine=1 to endLine
  459. set cursor to busy
  460. if bg field listType is in line aLine of itemList then
  461. if the number of items of line aLine of itemList > 1 then -- Submenus
  462. repeat with j=1 to the number of items of line aLine of itemList
  463. set cursor to busy
  464. if item j of line aLine of itemList is bg field listType then
  465. put checkMark() after item j of line aLine of itemList
  466. exit repeat -- jump out to save time
  467. end if
  468. end repeat
  469. if j = the number of items of line aLine of itemList then -- check "Other‚Ķ"
  470. put checkMark() after line endLine of itemList
  471. end if -- aline=endline
  472. exit repeat -- get out of the bigger repeat, since we found the item
  473. else -- there are no submenus
  474. if bg field listType is line aLine of itemList then
  475. put checkMark() after line aLine of itemList
  476. exit repeat -- get out of the bigger repeat, since we found the item
  477. end if -- field is line aLine of itemList
  478. end if -- number of items > 1
  479. end if -- bg field listType is in line aLine...
  480. end repeat -- aLine
  481. if aline = endline then -- check "Other‚Ķ"
  482. put checkMark() after line endLine of itemList
  483. end if -- aline=endline
  484. end if -- prevChar & followChar are commas or returns
  485. end if -- startChar > 0
  486. else -- it's not in the list, check "Other‚Ķ"
  487. put checkMark() after line endLine of itemList
  488. end if -- bg field listType is in itemList
  489. end if -- bg field listType ‚↠EMPTY
  490.  
  491. -- display popupmenu
  492. set the cursor to arrow
  493. put textheight of the target into TheTextHeight
  494. put HPopUpMenu(itemList,0, ¬¨
  495. (the bottom of the target), ¬¨  --vert coords¬¨
  496. the left of the target  + 1)¬¨  --horiz coords¬¨
  497. into ChosenLine
  498. set cursor to watch
  499. if ChosenLine is not 0 then
  500. put item 1 of ChosenLine into lineno
  501. put item 2 of ChosenLine into itemno
  502. put line lineno of bg field listField into templine
  503. put item itemno of templine into bg field listType
  504. if templine is "Other‚Ķ" then
  505. ask text("askEnterOther") & listType
  506. if it is not empty then
  507. put it into bg field listType
  508. end if
  509. end if
  510. end if
  511. end singleCheckMenu
  512.  
  513. on multiCheckMenu listType
  514. -- This script is used to make the popup menus come alive.
  515. -- I assume NO SUBMENUS for this script.
  516. -- It is for popup menus that can have more than one item checked at a time.
  517. -- If an item is chosen that is already checked, it will be deleted from the
  518. -- list generated. The generated list goes into bg field listType.
  519. --
  520. -- need a bg field called   listType List   that has all the menuitems
  521. -- (don't forget to modify the bg script to show and hide this new List field)
  522. -- need a bg field called listType to store the menu result
  523. -- Example: on the Problem Report cards, there is a popup menu for
  524. --      The severity of a bug, called "Priority"
  525. --      Here is what needs to be created:
  526. --         1) a button called "Priority    " (that's four spaces after)
  527. --            the script for the "Priority    " button should read:
  528. --               on mouseDown
  529. --                 singleCheckMenu "Priority"
  530. --               end mouseDown
  531. --               on mouseUp
  532. --                 set the hilight of me to FALSE
  533. --               end mouseUp
  534. --         2) a button with a down arrow, overlaying the four spaces
  535. --             the script for the down arrow button should send
  536. --             mouseups and mousedowns to the "Priority    " button
  537. --         3) a bg field called "Priority" where the result will go
  538. --         4) a bg field (invisible), called "Priority List"
  539. --            listing all proper priorities
  540. --         5) Modifications to the bg script to show and hide the
  541. --            "Priority List" bg field (see the other scripts there)
  542. set cursor to watch
  543. put listType & " List" into listField
  544.  
  545. if the optionKey is down and the shiftKey is down then
  546. set the visible of bg field listField to NOT visible of bg field listField
  547. exit multiCheckMenu
  548.  
  549. else if bugSent() then
  550. answer text("beenSent")
  551. exit multiCheckMenu
  552. end if
  553.  
  554. put bg field listField into itemList
  555. set the hilight of the target to TRUE
  556.  
  557. -- add checkmarks to itemList
  558. put FALSE into itIsOther -- initialize variable
  559. if bg field listType is not "" then
  560. put the number of items of bg field listType into listItems
  561. put the number of lines of itemList into endLine
  562. repeat with j= 1 to listItems
  563. repeat with i=1 to endLine
  564. put line i of itemList into tempa
  565. put item j of bg field listType into tempb
  566. if line i of itemList is item j of bg field listType then
  567. put checkMark() after line i of itemList
  568. exit repeat -- inner repeat no longer necessary
  569. end if
  570. end repeat -- i
  571. if i is endLine then -- then it's ‚ÄúOther‚Ķ‚Äù
  572. put TRUE into itIsOther
  573. end if
  574. end repeat -- j
  575. if itIsOther then -- mark the Other‚Ķ menuitem
  576. put checkMark() after line endLine of itemList
  577. end if
  578. end if
  579.  
  580. -- display popupmenu
  581. set cursor to arrow
  582. put textheight of the target into TheTextHeight
  583. put HPopUpMenu(itemList,0, ¬¨
  584. (the bottom of the target), ¬¨  --vert coords¬¨
  585. the left of the target  + 1)¬¨  --horiz coords¬¨
  586. into ChosenLine
  587. if ChosenLine is not 0 then -- anything was chosen
  588. if bugSent() is not TRUE then
  589. put item 1 of ChosenLine into lineno
  590. put item 2 of ChosenLine into itemno
  591. put line lineno of bg field listField into templine
  592. set cursor to watch
  593. if templine is not "Other‚Ķ" and the last word of line lineno of itemList is checkMark("no space") then
  594. -- delete the item rather than insert it
  595. repeat with i=1 to the number of items of bg field listType
  596. if item i of bg field listType is templine then
  597. delete item i of bg field listType
  598. exit repeat
  599. end if
  600. end repeat
  601. else
  602. if templine is "Other‚Ķ" then
  603. ask text("askEnterOther") & listType
  604. if it is not empty then
  605. put it into item itemno of templine -- so that following if will parse correctly
  606. else -- the user hit "Cancel"
  607. put "" into item itemno of templine
  608. end if
  609. end if
  610. if bg field listType is "" then
  611. put item itemno of templine into bg field listType
  612. else
  613. if item itemno of templine is not "" then
  614. put "," & item itemno of templine after bg field listType
  615. end if
  616. end if
  617. end if       -- delete vs insert
  618. else -- shouldn't be modifying this card
  619. answer text("beenSent")
  620. end if -- bugSent()‚Ķ
  621. end if -- anything was chosen
  622. end multiCheckMenu
  623.  
  624. on getINITs
  625. -- Thanks to Jay Hodgon for these nifty XFCNs.
  626.  
  627. put FilesInSys("INIT") into INITList
  628. put FilesInSys("cdev") into CDEVList
  629.  
  630. --RDEV's are another type - printer documents
  631. set cursor to busy
  632. put "INITS: " into bg field "other stuff"
  633. repeat with index = 1 to number of lines of InitList
  634. put line index of InitList & ", " after bg field "other stuff"
  635. end repeat
  636. delete last char of bg field "other stuff" -- the comma
  637. delete last char of bg field "other stuff" -- the comma
  638.  
  639. put return & "CDEVS: " after bg field "other stuff"
  640. repeat with index = 1 to number of lines of CDEVList
  641. put line index of CDEVList & ", " after bg field "other stuff"
  642. end repeat
  643. delete last char of bg field "other stuff" -- the comma
  644. delete last char of bg field "other stuff" -- the comma
  645.  
  646. -- DEBUGGER VERSION
  647. put return & "MacsBug:" && FileVersion("dbgr","mxbg") after bg field "other stuff"  -- MACSBUG
  648. end getINITs
  649.  
  650. on getMailMethod what
  651. global cqfCustom
  652.  
  653. -- used by the buttons that send bugs by mail
  654. -- this is here because when sending bugs individually, we want
  655. -- to be asked which method each time, but when sending as a group
  656. -- we only want to be asked once
  657. global mailMethod, mailMethodTemp, ccAddress, ccAddressFlag
  658. if line 16 of bg field "Personal Info" of cd "Cover Card" is "on" then
  659. put "Server" into mailMethod
  660. exit getMailMethod
  661. end if
  662. put "None" into mailMethod
  663. if mailMethodTemp is empty then
  664. put text("Default Mail Type") into mailMethodTemp
  665. end if
  666. put bg field "ccAddress" of card 1 into ccAddress
  667. if what is "many" then
  668. -- Make text appropriate for sending many bugs
  669. put text("placeInOutBasket2") into line 10 of dialogInput
  670. put text("saveBugTo2") into line 9 of dialogInput
  671. put text("bugSentTo2") into line 8 of dialogInput
  672. else -- only sending one bug
  673. -- Make text appropriate for sending a single bug
  674. put text("placeInOutBasket") into line 10 of dialogInput
  675. put text("saveBugTo") into line 9 of dialogInput
  676. put text("bugSentTo") into line 8 of dialogInput
  677. end if
  678. -- BL-L 10/1/93 added custom dialog here
  679. if mailMethodTemp is "Text File" then
  680. put "on" into line 4 of dialogInput -- highlight "Text File" button
  681. else -- AppleLink - the default
  682. put "on" into line 3 of dialogInput -- highlight "AppleLink" button
  683. end if -- mailMethodTemp
  684. if ccAddress is empty and text("APPLELINK CC") is not empty then
  685. put text("APPLELINK CC") into ccAddress -- 1.6d12 BL-L 5/8/94 Use default from resource
  686. put TRUE into ccAddressFlag
  687. end if -- ccAddress empty
  688. if ccAddress is not empty then
  689. put ccAddress into line 6 of dialogInput -- show ccAddress, if there is one
  690. if ccAddressFlag is empty then
  691. if cqfCustom then
  692. put TRUE into ccAddressFlag
  693. else
  694. put FALSE into ccAddressFlag
  695. end if -- cqfCustom
  696. end if -- ccAddressFlag
  697. if ccAddressFlag then
  698. put "on" into line 5 of dialogInput -- highlight "Send a Copy to" checkbox if applicable
  699. end if
  700. end if
  701. put text("APPLELINK") into line 7 of dialogInput
  702. -- XFCN for custom Modal Dialog
  703. put ModalDialog("Send Bug",dialogInput,cardCenter) into dialogOutput
  704. if line 1 of dialogOutput is not text("Cancel") then
  705. if line 3 of dialogOutput is "on" then -- remember button settings for next time
  706. put "AppleLink" into mailMethodTemp
  707. else -- Text File button was selected
  708. put "Text File" into mailMethodTemp
  709. end if
  710. if line 5 of dialogOutput is "on" then -- sending to a second address
  711. put TRUE into ccAddressFlag -- remember whether they're sending to a second address
  712. else
  713. put FALSE into ccAddressFlag
  714. end if
  715. if ccAddressFlag then -- see if they want bug to go to a second address
  716. if line 4 of dialogOutput is "on" then -- hey! they're sending to a text file
  717. answer text("Send as Text Error 1") & line 6 of dialogOutput¬¨
  718. & text("Send as Text Error 2") with text("Cancel") or text("Continue")
  719. if it is not "Continue" then
  720. put "None" into mailMethod
  721. exit getMailMethod
  722. end if -- not Continue
  723. end if -- text file error
  724. if line 6 of dialogOutput is empty then -- hey! They didn't give an address
  725. answer text("No Forward") with text("Cancel") or text("Continue")
  726. if it is text("Cancel") then
  727. put "None" into mailMethod
  728. exit getMailMethod
  729. end if
  730. end if -- line 6
  731. put line 6 of dialogOutput into ccAddress
  732. put ccAddress into bg field "ccAddress" of card 1
  733. end if -- ccAddressFlag
  734. if line 3 of dialogOutput is "on" then -- sending to AppleLink
  735. put "AppleLink" into mailMethod
  736. else -- Text File (if line 4 of dialogOutput is "on" then) could put alternate methods here
  737. put "Text File" into mailMethod
  738. end if
  739. else
  740. put "None" into mailMethod -- didn't send it
  741. end if -- it is "OK"
  742. end getMailMethod
  743.  
  744. on notImplemented tWhat
  745. -- beep 2
  746. answer "This feature is not implemented as of" && the date & return &¬¨
  747. "--‚Ä¢" && tWhat
  748. end notImplemented
  749.  
  750. on triangleButton tMessage, tObjectType, tClickLoc
  751. --‚Ä¢ Added by bRYgUY K. Carter - 11/17/92
  752. --‚Ä¢ A more generic script for the "Triangle" menu buttons
  753. --‚Ä¢ Figures out which button is "behind" it and send the appropriate message
  754. --‚Ä¢ to that button
  755. set cursor to watch
  756. do "put the number of" && tObjectType & "s into tNumObjects"
  757. repeat with B = 1 to tNumObjects
  758. do "put the short name of" && tObjectType && B && "into tObjectName"
  759. if tObjectName contains "Triangle" then next repeat
  760.  
  761. do "put the rect of" && tObjectType && B && "into tObjectRect"
  762. if tClickLoc is within tObjectRect then
  763. do "send" && quote & tMessage & quote && "to" && tObjectType && B
  764. exit triangleButton
  765. end if
  766. end repeat
  767. end triangleButton
  768.  
  769. on customDelete which  -- formerly configDelete & myDelete BL-L 8/16/94
  770. if which is empty then
  771. answer text("deleteCard") with text("Cancel") or text("OK")
  772. if it is "OK" then
  773. set the cantDelete of this card to FALSE
  774. doMenu "Delete Card"
  775. end if
  776. else if which is "no message" then
  777. set the cantDelete of this card to FALSE
  778. doMenu "Delete Card"
  779. end if
  780. end customDelete
  781. </script>
  782.     <background id="3986" file="background_3986.xml" name="Bug Report" />
  783.     <background id="4715" file="background_4715.xml" name="Configuration" />
  784.     <background id="8289" file="background_8289.xml" name="Bug List" />
  785.     <card id="8637" file="card_8637.xml" marked="false" name="Cover Card" owner="8289" />
  786.     <card id="6151" file="card_6151.xml" marked="false" name="Configuration Title Card" owner="4715" />
  787.     <card id="2102" file="card_2102.xml" marked="false" name="" owner="4715" />
  788.     <card id="3802" file="card_3802.xml" marked="false" name="Sample Problem Description" owner="3986" />
  789. </stack>
  790.